<template>
  <BoPreviewPdf
    title="预览pdf"
    iframe-url="https://mozilla.github.io/pdf.js/web/compressed.tracemonkey-pldi-09.pdf"
    :loading="loading"
    v-model:open="open"
  ></BoPreviewPdf>
  <Button @click="onPreview">预览</Button>
</template>

<script setup lang="tsx">
import { ref } from 'vue';
import BoPreviewPdf from '@/PreviewPdf/src/index.vue';
import { Button } from 'ant-design-vue';

const loading = ref(true);
const open = ref(false);

const onPreview = () => {
  loading.value = true;
  open.value = true;
};
</script>

<style lang="scss" scoped></style>
